import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import viteConfig from './vite.config'
import { resolve } from 'path'

export default defineConfig({
  main: {
    envPrefix: 'MAIN_',
    resolve: {
      alias: {
        '@main': resolve('src/main'),
        '@build': resolve('build'),
        '@resources': resolve('resources')
      }
    },
    plugins: [externalizeDepsPlugin()]
  },
  preload: {
    plugins: [externalizeDepsPlugin()]
  },
  renderer: viteConfig
})
